package com.zp.common.base.constant;


/**
 * 全局常量
 *
 */
public final class Atom {


    private Atom() {}

    public static final String LOGIN_USER="loginUser";

    /** 常量0 */
    public static final int CONSTANT_ZERO = 0;

    /** 常量1 */
    public static final int CONSTANT_ONE = 1;

    /** 常量2 */
    public static final int CONSTANT_TWO = 2;

    /**检测端点健康*/
    public static String HEALTH="/actuator/health";

    /**刷新token*/
    public static String REFRESH_TOKEN_HEADER="refreshToken";

    /**email**/
    public static String EMAIL="email";

    /**手机号**/
    public static String TELEPHONE="telephone";

    /**token唯一标识**/
    public static final String JTI="jti";

    /**过期标识**/
    public static final String EXPR="expr";

    /**过期前缀**/
    public static final String JTI_KEY_PREFIX = "ZPZP";

    /**token名称**/
    public final static String TOKEN_NAME="jwt-token";

    /**认证名称**/
    public final static String PRINCIPAL_NAME="principal_name";

    /**权限信息**/
    public static final String AUTHORITIES_NAME="authorities";

    /**用户id**/
    public static final String USER_ID="user_id";

    /**
     * 权限<->url对应的KEY
     */
    public final static String OAUTH_URLS="oauth2:oauth_urls";

    /**root用户超级管理员**/
    public static final String ROLE_ROOT_CODE ="ROLE_root";

    /**白名单放行的路径**/
    public static final String[] EXCLUSION_PATHS={"/api/auth/oauth/token","/api/auth/oauth/authorize","/actuator/health"};

}